package com.ltsznh.android.locationreporting;

import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;
import android.util.Log;

/**
 * Created by 涛 on 2014/12/11.
 */
public class LrLocationListener implements LocationListener {

    @Override
    public void onLocationChanged(Location location) {
        Log.v("dddd", "onLocationChanged");
        LrReceiver.report(location);
//        LrReceiver.removeUpdates(1000L * 60 * 10);
    }

    @Override
    public void onStatusChanged(String provider, int status, Bundle extras) {
        Log.v("dddd", "onStatusChanged" + provider + 1);
        LrReceiver.refreshUpdates(100);
    }

    @Override
    public void onProviderEnabled(String provider) {
        Log.v("dddd", "onProviderEnabled" + provider);
        LrReceiver.refreshUpdates(100);

    }

    @Override
    public void onProviderDisabled(String provider) {
        Log.v("dddd", "onProviderDisabled" + provider);
        LrReceiver.refreshUpdates(100);
    }
}
